{include file="Public:header2"/}
<body style="min-height: 100%;background-color: #fff">
<div style="padding: 0 20px;position: relative;z-index: 99;border-bottom: 1px solid #e5e5e5;line-height: 39px;height: 39px;overflow: hidden;">
      <span style="visibility: visible;">
        <a href="{:url('/admin/seckill')}" style="padding-right: 8px;line-height: 22px;font-size: 14px;color: #333!important;">秒杀设置<span class="layui-box">&gt;</span></a>
        <a href="javascript:;"> <cite>添加时间段</cite></a>
      </span>
</div>
<style>
    .laydate-time-list>li:nth-of-type(2){
        display: none;
    }
    .laydate-time-list>li:nth-of-type(3){
        display: none;
    }
    .laydate-btns-now{
        display: none !important;
    }
</style>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form onsubmit="return false;">
                        <div class="layui-form" wid100 lay-filter="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">分类名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="seckill_time" id="seckill_time" style="width: 400px;"  placeholder="请选择分类名称" autocomplete="off" class="layui-input">
                                </div>
                            </div>
<!--                            <div class="layui-form-item">-->
<!--                                <label class="layui-form-label">限购数量</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <input type="text" name="goods_num"  style="width: 400px;"  placeholder="请输入限购数量" autocomplete="off" class="layui-input">-->
<!--                                </div>-->
<!--                            </div>-->
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" onclick="return check()">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="Public:footer"/}
</body>
</html>
<script type="text/javascript">
    layui.use(['layer','form','laydate'], function(){
        var $ = layui.$;
        var form = layui.form;
        var laydate = layui.laydate;
        // //时间选择器
        // laydate.render({
        //     elem: '#seckill_time'
        //     ,type: 'time'
        //     ,format: 'HH:mm'
        // });

    });

    function check(){
        var url="{:url('/admin/seckill_add')}";
        var $ = layui.$;
        var load=layer.load(2);
        $.post(url,$("form").serialize(),function(data){
            if(data.status==1){
                layer.msg(data.msg,{icon:1,time:1000},function(){
                    location.href="{:url('/admin/seckill')}";
                });
            }else{
                layer.msg(data.msg,{icon:2,anim:6,time:1500},function(){
                    layer.close(load);
                });
            }
        })
    }
</script>
